/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    color: #333;
    overflow: auto; /* 允许滚动但隐藏滚动条 */
}

/* 隐藏滚动条但保持滚动功能 */
::-webkit-scrollbar {
    display: none;
}

html {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
    color: #333;
}

/* 主内容区域 */
main {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 1rem;
}

.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    transition: border-color 0.3s ease;
}

.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group select:hover {
    border-color: #667eea;
}

/* 下载按钮样式 */
.download-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.download-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
    background: linear-gradient(135deg, #20c997 0%, #28a745 100%);
}

.download-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 下载进度区域 */
.download-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #e1e5e9;
}

.download-info {
    margin-bottom: 20px;
}

.download-info p {
    margin-bottom: 10px;
    font-weight: 500;
    color: #555;
}

/* 进度条样式 */
.progress-container {
    position: relative;
    margin: 20px 0;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e1e5e9;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 10px;
}

.progress-text {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: bold;
    color: #333;
    font-size: 0.9rem;
}

.download-details {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
}

/* 下载状态 */
.download-status {
    text-align: center;
    margin-top: 20px;
}

.download-status p {
    color: #667eea;
    font-weight: 500;
}

/* 结果区域 */
.result-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #e1e5e9;
    text-align: center;
}

.result-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.result-info p {
    margin-bottom: 10px;
    font-size: 1rem;
}

#result-path {
    font-family: 'Courier New', monospace;
    background: #e9ecef;
    padding: 10px;
    border-radius: 4px;
    word-break: break-all;
}

/* 响应式设计 */
@media (max-width: 600px) {
    .container {
        padding: 10px;
    }

    header h1 {
        font-size: 2rem;
    }

    main {
        padding: 20px;
    }

    .form-group select {
        padding: 10px 12px;
    }

    .download-btn {
        padding: 12px;
        font-size: 1rem;
    }
}

/* 加载动画 */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.loading {
    animation: pulse 1.5s infinite;
}

/* 成功状态 */
.success {
    color: #28a745;
}

/* 错误状态 */
.error {
    color: #dc3545;
}

/* 取消下载按钮样式 */
.cancel-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.cancel-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.4);
    background: linear-gradient(135deg, #c82333 0%, #dc3545 100%);
}
